package com.jh.netty.client;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;

/**
 * 客户端 向 服务端 发送数据时
 */
public class MyChannelOutboundHandlerAdapter extends ChannelOutboundHandlerAdapter {

    @Override
    public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
        System.out.println("出站 MyChannelOutboundHandlerAdapter: " + msg);
        super.write(ctx, msg, promise);
    }
}
